<template>
	<view>
		<hx-navbar ref="hxnb"  :config="config">
			<view slot="left">
				<view class="naviLeft" @click="fun1()">
					<view class="store">
						<u-icon name="gift" color="#fff" size="15"></u-icon>
						<text style="color: #fff; font-size: 26rpx; font-weight: bold; margin: 0 6rpx 0 10rpx;">西安钟楼店</text>
						<u-icon name="arrow-right" color="#fff" size="13"></u-icon>
					</view>
					<view class="" style="color: #fff; font-size: 20rpx;">距离您2.5km</view>
				</view>	
			</view>
		</hx-navbar>
		<view class="bodyBox1">
			<text class="text1">我是text1</text>
			<text class="text2 uni-ellipsis">我是text2我的部分样式继承了text1啊啊啊啊啊啊啊啊</text>
			<text class="text3">我是text3我的部分样式继承了text2</text>
		</view>
		<view class="bodyBox2">
			<text>aaaa</text>
			<text>bbbb</text>
		</view>
	    <view class="container" @click="fun1()">
	    	<view class="arrow">
				<u-icon name="arrow-right"></u-icon>
	    	</view>
	    </view>
		
		<view class="bodyBox1">
			
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				config: {
				   backgroundColor: [1,['#FFA77E','#F9312F','#F92422']],
				   statusBarFontColor:'#ffffff',
				   back : false,
				   leftSlot : true,
				   leftSlotSwitch : true,
				   backgroundColorLinearDeg : "0"
				},
				flag: false
			}
		},	
		onLoad() {

		},
		
		methods: {
			fun1() {
				// if(this.flag) {
				console.log('你好');
				// }
			}
		}
	}
</script>

<style lang="scss" scoped>
	$write-color : #fff;
	@mixin bodyBox {
		background-color: #fff;
		padding: 20upx;
		margin: 20upx;
		border-radius: 16rpx;
	}
	.naviLeft {
		padding-left: 40rpx;
		display: flex;
		flex-direction: column;
		justify-content: center;
		align-items: center;
		.store {
			display: flex;
			align-items: center;
		}
	}

	.bodyBox1 {
		@include bodyBox()
	}

	.bodyBox2 {
		position: relative;
		@include bodyBox()
		
		&::after {
		   content:  '>';
		   display: block;
		   position: absolute;
		   top: 50rpx;
		   right: 10rpx;
		   
		}
	}

	text {
		display: block;
	}

	.text1 {
		font-size: 26upx;
		font-weight: bold;
	}

	.text2 {
		@extend .text1;
		font-size: 36upx;
		color: red;
	}

	.text3 {
		@extend .text2;
		color: $main-color;
	}
	.container {
		background: $write-color;
		position: relative;
		.container::after {
			content: '';
			display: block;
			
		}
	
	}
	
</style>
